package com.xiaobai.model.convertor.system;

import com.xiaobai.model.entity.system.Role;
import com.xiaobai.model.vo.system.role.RoleTreeVO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface RoleConvertor {
    RoleConvertor INSTANCE = Mappers.getMapper(RoleConvertor.class);

    RoleTreeVO toTreeVO(Role role);

    List<RoleTreeVO> toTreeVOList(List<Role> roleList);

}
